fixed bad strcpy causing coredump with jlps.axe
authorjames_sherring <james_sherring@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 5 Dec 2003 00:12:19 +0000 (00:12 +0000)
committerjames_sherring <james_sherring@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 5 Dec 2003 00:12:19 +0000 (00:12 +0000)
st2gpx/src/writepcx.c

index 16d29357233b676a0be6462e685912fbcf97f9af..89ae0f03b6b933a7046fce132e4e4a86f3479679 100644 (file)
@@ -350,9 +350,9 @@ void pcx5_write_jour_pt(FILE* file, struct journey * jour, struct jour_rtept * r
 \r
                strpad(timedate, 19);\r
 \r
-               strcpy(desc, rtept->text1);\r
+               memcpy(desc, rtept->text1,39);\r
                strpad(desc, 40);\r
-\r
+               \r
                pcx5_write_pt(file, \r
                                          pt_type, \r
                                          rtept->garmin_ident, \r
@@ -363,6 +363,7 @@ void pcx5_write_jour_pt(FILE* file, struct journey * jour, struct jour_rtept * r
                                          desc, \r
                                          proximity, \r
                                          symbol);\r
+               \r
 //     }\r
 //     else if(pt_type==GAR_RTE)\r
 //     {\r